﻿<?php
	session_start();
	define('_JEXEC', 1);
	ob_start();
	function __autoload($class_name)
	{
		require_once "classes/" . $class_name . ".php";
	}
	include_once "functions.php";
   
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QUỸ TÍN DỤNG NHÂN DÂN MỸ HÒA</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<embed src="images/banner.swf" quality="high" type="application/x-shockwave-flash" wmode="transparent" width="1349" height="150" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always"></embed>
<link href="buttons/buttons.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
<link rel="stylesheet" type="text/css" href="css/content_slider_style.css" />
<script type="text/javascript" src="scripts/jquery.1.7.2.min.js" ></script>
<script type="text/javascript" src="scripts/jquery-ui.min.js" ></script>
<script type="text/javascript">
	$(document).ready(function(){
		$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
	});
</script>

<script type="text/javascript" src="scripts/ddsmoothmenu.js">

/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "templatemo_menu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>
</head>
<body>

<div id="templatemo_wrapper_outer">
 <div id="templatemo_wrapper">   
	<div id="templatemo_menu" class="ddsmoothmenu">
            <ul>
	            	<?php 
	            		include_once 'ketnoi.php';
	                    $sqlbgt = "select * from baigioithieu order by MaBaiGioiThieu ASC";
	                    $rsbgt = mysql_query($sqlbgt);
	            	?>
                <li><a href="index.php" class="selected">Trang chủ</a></li>    
                <li><a href="about.php?do=baigioithieuchitiet&id=<?php echo $rsbgt[0]["MaBaiGioiThieu"];?>" class="selected">Giới thiệu</a>
                <ul>
	                <?php
	                    	while($dongbgt = mysql_fetch_array($rsbgt))
	                    	{	
	                            echo "<li><a rel='nofollow' href='about.php?do=baigioithieuchitiet&id={$dongbgt["MaBaiGioiThieu"]}'>{$dongbgt['TieuDe']}</a></li>";
				        	}
	                ?>  
            	</ul>
                </li>           
                <?php
                    	include_once 'ketnoi.php';
                    	$sqlcm = "select * from chuyenmuc order by MaChuyenMuc ASC";
                    	$rscm = mysql_query($sqlcm);
                    	while($dongcm = mysql_fetch_array($rscm))
                    	{
                    	    if(strcasecmp($dongcm['TenChuyenMuc'],"Liên hệ")!=0)
                            {
                            		echo "<li><a href='news.php?do=baivietchuyenmuc&mcm={$dongcm["MaChuyenMuc"]}&page=1'>{$dongcm['TenChuyenMuc']}</a>";
                            				echo "<ul>";
                            					$sqllcm = "select * from loaichuyenmuc where MaChuyenMuc= ".$dongcm['MaChuyenMuc'];
                            					$rschudecon = mysql_query($sqllcm);
                            					while($donglcm = mysql_fetch_array($rschudecon))
                            					{
                            						echo "<li><a rel='nofollow' href='news.php?do=baivietloaichuyenmuc&mlcm={$donglcm["MaLoaiChuyenMuc"]}&page=1'>{$donglcm['TenLoaiChuyenMuc']}</a></li>";
                            					}
                            				echo "</ul>";
                            		echo "</li>";
                            }
                    	}
                    ?>
                <li><a href="contact.php">Liên hệ</a></li>
            </ul>
            <?php include('timkiem.php'); ?>
            <br style="clear: left" />
            
    </div> <!-- end of templatemo_menu -->


    <div id="templatemo_content">
    	
        <div class="col_w600">
            <?php include 'do.php';?>
            
        </div>
        
        <div class="col_w310 col_last0">
				<div class="col_w300 col_last1">
					<div class="sidebar_title"><img style="vertical-align:top; margin-top:-5px;margin-left:-20px;" src="images/star.png"/>
			        	TIN MỚI
			        </div>
			        <?php
			        $sqlbaiviet = "select * from baiviet order by NgayDang DESC limit 4";
					$dsbaiviet = mysql_query($sqlbaiviet);
					while ($dong = mysql_fetch_array($dsbaiviet))
					{	
						$HinhAnhPath = substr($dong["HinhAnh"], 3);
						echo "<div class='sb_news_box'>";	
							echo "<img src='{$HinhAnhPath}' alt='Image 04' />";
							echo "<h8><a href='news.php?do=baivietchitiet&mbv={$dong["MaBaiViet"]}'>{$dong['TieuDe']}</a></h8>";
						echo "</div>";
					}
					?>		
				</div>
				
				<div class="col_w300 col_last1">
					<div class="sidebar_title" style="font-size:16px; "><img style="vertical-align:top; margin-top:-5px;margin-left:-20px;" src="images/star.png"/>
			        	TIN XEM NHIỀU NHẤT
			        </div>
			        <?php 
				        $sqlbaiviet = "select * from baiviet order by LuotXem desc limit 0,4";
				        $dsbaiviet = mysql_query($sqlbaiviet);
				        while ($dong = mysql_fetch_array($dsbaiviet))
				        {
				        	$HinhAnhPath = substr($dong["HinhAnh"], 3);
				        	echo "<div class='sb_news_box'>";
				        	echo "<img src='{$HinhAnhPath}' alt='Image 04' />";
				        	echo "<h8><a href='news.php?do=baivietchitiet&mbv={$dong["MaBaiViet"]}'>{$dong['TieuDe']}</a></h8>";
				        	echo "</div>";
				        }
			        ?>
				</div>
	     </div>  
	    <div class="cleaner"></div>
	</div>
</div>
</div>
<div id="templatemo_footer_wrapper">

    <a href="#" id="go_top"></a>

		<script type="text/javascript">
		(function(){
			// Ẩn hiện icon go-top
			$(window).scroll(function(){
				if( $(window).scrollTop() == 0 ) {
					$('#go_top').stop(false,true).fadeOut(600);
				}else{
					$('#go_top').stop(false,true).fadeIn(600);
				}
			});
			
			// Cuộn trang lên với scrollTop
			$('#go_top').click(function(){
				$('body,html').animate({scrollTop:0},400);
				return false;
			})
		})(jQuery);
		</script>		
	
   <div id="templatemo_copyright">
    
         Copyright © Quỹ tín dụng Mỹ Hòa | Thiết kế bởi <a href="http://www.facebook.com/heodatbietnoi" rel="nofollow" target="_parent">Hồ Thị Thanh Thiên</a> - <a href="https://www.facebook.com/bao.yen.2412" rel="nofollow" target="_parent">Lý Bảo Yến </a> 
    
    </div>
</div>


<script type='text/javascript' src='js/logging.js'></script>
</body>
</html>